<template></template>
<script>
  export default {
    name:"remoteJs",
    data(){
      return{
       
      }
    },
    methods:{
      createScript(){
      const s = document.createElement('script');
      s.type = 'text/javascript';
      s.src = this.src;
      document.querySelector(this.insertId).appendChild(s);
      }
    },
    mounted(){
      this.createScript();
    },
    props:{
      src:{
        type:String,
        default:""
      },
      insertId:{
        type:String,
        default:"head"
      }
    },
  /*components: {
   'remoteJs': {
    render(createElement) {
      return createElement('script', { attrs: { type: 'text/javascript', src: this.src }});
    },
    props: {
      src: { type: String, required: true },
    },
  },
  },*/
}
</script>